<template>
  <div class="error-dialog">
    <SvgIcon iconName="error" size="50px" />
    <div class="title">故障代码：{{ props.info.code }}</div>
    <div class="description">{{ props.info.description }}</div>
    <div class="btn" @click="handleOK">{{ props.info.btnText }}</div>
  </div>
</template>

<script setup lang="ts">
const emit = defineEmits(['fault'])
const props = defineProps({
  info: {
    type: Object,
    default: {}
  }
})
const handleOK = () => {
  emit('fault', true)
}
</script>
<style lang="less" scoped>
@import url(../assets/style/error.less);
</style>
